<%--
  Created by IntelliJ IDEA.
  User: l
  Date: 2022/8/6
  Time: 12:41
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>删除商品</title>
    <style>
        table{
            width: 1000px;
            margin: 0 auto;
        }
        #box{
            width: 1000px;
            height: 20px;
            margin: 0 auto;
            text-align: left;
        }
    </style>
</head>
<body>
<table cellpadding="0" cellspacing="0" border="1">
    <tr>
        <td>编号</td>
        <td>名称</td>
        <td>价格</td>
        <td>上架时间</td>
        <td>操作</td>
    </tr>
    <c:forEach var="goods" items="${delGoodsList}">
        <tr>
            <td>${goods.gid}</td>
            <td>${goods.gname}</td>
            <td>${goods.price}</td>
            <td>${goods.registerdate}</td>
            <td><a href="Goods?opr=delSave&gid=${goods.gid}">下架</a></td>
        </tr>
    </c:forEach>
</table>
<div id="box">
    <c:if test="${delPage.currentPage>1}">
        <a href="Goods?opr=del&currentPage=1">第一页</a>
        <a href="Goods?opr=del&currentPage=${delPage.currentPage-1}">上一页</a>
    </c:if>
    <c:if test="${delPage.currentPage<delPage.pages}">
        <a href="Goods?opr=del&currentPage=${delPage.currentPage+1}">下一页</a>
        <a href="Goods?opr=del&currentPage=${delPage.pages}">最后一页</a>
    </c:if>
    <p>
        <a href="javascript:history.back();">返回上一页</a>
    </p>
</div>
</body>
</html>
